package parser;

import antlr.RecognitionException;
import antlr.Token;

class Name extends Expr {
    
    int id;
    
    Name(int id) {
        this.id = id;
    }

    void delete(ByteStream out) throws RecognitionException {
        throw new RecognitionException("Cannot delete a string constant");
    }
 
    void write(ByteStream out) throws RecognitionException {
        out.write(Opcodes.NAME);
        out.writeShort(id);
    }
           
    void writeLHS(ByteStream out) throws RecognitionException {
        throw new RecognitionException("Cannot assign to a string constant");
    }   
    
}
